Skip to content

Also set include directories for the BUILD_INTERFACE#394

Open
morxa wants to merge 1 commit into
FreeOpcUa:masterfrom
morxa:include-directories-build-interface
Open

Also set include directories for the BUILD_INTERFACE#394
morxa wants to merge 1 commit into
FreeOpcUa:masterfrom
morxa:include-directories-build-interface

Conversation

@morxa
Copy link
Copy Markdown
Contributor

@morxa morxa commented Aug 18, 2022

So far, the directory include/ was included into the include
directories by a global directive as well as using the
INSTALL_INTERFACE. However, when including the project with
FetchContent into another project, cmake uses the BUILD_INTERFACE to
declare target properties, in particular the target's include
directories, but it does not use the project-wide include directories.
Thus, also include the directory into each targets include directories
via its BUILD_INTERFACE.

This fixes build failures of projects that include freeopcua via FetchContent. Previously, those builds failed because the compiler could not find the header files.

Fixes robocup-logistics/gazebo-rcll#57.

So far, the directory `include/` was included into the include
directories by a global directive as well as using the
INSTALL_INTERFACE. However, when including the project with
FetchContent into another project, cmake uses the BUILD_INTERFACE to
declare target properties, in particular the target's include
directories, but it does not use the project-wide include directories.
Thus, also include the directory into each targets include directories
via its BUILD_INTERFACE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cannot find /opc/ua/client/client.h

1 participant